package com.gjy.sentinel.demo.example;

import com.alibaba.csp.sentinel.slots.block.BlockException;

/**
 * @author gjy
 * @version 1.0
 * @since 2025-10-15 16:42:18
 */
public class OrderBlockHandler {

    // 参数必须与接口方法保持一致，且最后多一个 BlockException 参数
    public static String handleBlock(String userId, String sku, int amount, BlockException ex) {
        // 可以返回兜底信息或直接抛 RuntimeException
        return "order-blocked-by-sentinel";
    }

}
